Commit 4018e498 authored by Arthur Lutz's avatar Arthur Lutz
Browse files

[gitlab-ci] autogenerated from tox

parent ed4c44738e1f
Pipeline #16587 passed with stage
in 1 minute and 6 seconds
image: python:3.7
before_script:
- pip install tox
check-manifest:
script: tox -e check-manifest
flake8:
script: tox -e flake8
py27:
script: tox -e py27
......@@ -8,3 +8,4 @@ recursive-include test *.py
recursive-include wdoc *
prune debian
include README.rst
exclude .gitlab-ci.yml
......@@ -39,8 +39,8 @@ class TranslatableEntityAddHook(Hook):
rql = 'Any L WHERE L is I18nLang, L code %(c)s'
rset = self._cw.execute(rql, ctx)
if rset.rowcount == 0:
raise ValueError, self._cw._('language "%s" not found') % lang
elang = rset.get_entity(0, 0)
raise ValueError(self._cw._('language "%s" not found') % lang)
rset.get_entity(0, 0)
self._cw.create_entity('I18nField', field_name=field,
i18nfield_of=self.entity)
......@@ -116,9 +116,9 @@ class ServerStartupHook(LangCacheUpdateMixin, Hook):
def __call__(self):
with self.repo.internal_cnx() as cnx:
try:
op = UpdateLangCacheOp.get_instance(cnx)
UpdateLangCacheOp.get_instance(cnx)
for lang in cnx.execute('Any L,C,N WHERE L is I18nLang, '
'L code C, L name N').entities(0):
self.update_cache(lang, 'set')
except:
except Exception:
pass
......@@ -26,7 +26,12 @@ __docformat__ = "restructuredtext en"
import os
import sys
import shutil
from os.path import isdir, exists, join, walk
from os.path import isdir, exists, join
try:
from os.path import walk
except ImportError:
from os import walk
try:
if os.environ.get('NO_SETUPTOOLS'):
......@@ -45,7 +50,7 @@ from __pkginfo__ import modname, version, license, description, web, \
author, author_email
if exists('README.rst'):
long_description = file('README.rst').read()
long_description = open('README.rst', 'r').read()
else:
long_description = ''
......@@ -55,7 +60,7 @@ if USE_SETUPTOOLS:
for entry in ("__depends__",): # "__recommends__"):
requires.update(getattr(__pkginfo__, entry, {}))
install_requires = [("%s %s" % (d, v and v or "")).strip()
for d, v in requires.iteritems()]
for d, v in requires.items()]
else:
install_requires = []
......@@ -116,7 +121,7 @@ def export(from_dir, to_dir,
shutil.copy2(src, dest)
try:
os.mkdir(to_dir)
except OSError, ex:
except OSError as ex:
# file exists ?
import errno
if ex.errno != errno.EEXIST:
......
......@@ -24,7 +24,7 @@ commands =
[flake8]
format = pylint
ignore =
ignore = W503, E203, E731, E231
exclude = migration/*,test,setup.py,.tox/*,scripts,doc
max-line-length = 100
max-complexity = 12
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment