Skip to content

Commit

Permalink
sweep: #734 Fix imports from TornadoRest for UPHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
fstagni authored and web-flow committed Mar 14, 2023
1 parent 84c7c5a commit df9087e
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 220 deletions.
215 changes: 0 additions & 215 deletions .pylintrc

This file was deleted.

4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Web app extension for the `DIRAC project <https://github.com/DIRACGrid/DIRAC>`_.

Status master branch (stable):

.. image:: https://github.com/DIRACGrid/WebAppDIRAC/workflows/Basic%20tests/badge.svg?branch=rel-v4r3
:target: https://github.com/DIRACGrid/WebAppDIRAC/actions?query=workflow%3A%22Basic+tests%22+branch%3Arel-v4r3
.. image:: https://github.com/DIRACGrid/WebAppDIRAC/workflows/Basic%20tests/badge.svg?branch=rel-v5r0
:target: https://github.com/DIRACGrid/WebAppDIRAC/actions?query=workflow%3A%22Basic+tests%22+branch%3Arel-v5r0
:alt: Basic Tests Status

Status integration branch (devel):
Expand Down
59 changes: 59 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,62 @@ git_describe_command = "git describe --dirty --tags --long --match *[0-9]* --exc
[tool.black]
line-length = 120
target-version = ['py39']

[tool.pylint.basic]

# We mostly have CamelCase, with a few differences.
# In tests we have quite some snake_case, mostly due to pytest
# We can instruct pylint to understand both, but the problem is that it
# will stick to one style per file (i.e if the first variable is snake,
# all the following must be snake)
# It's not quite the case yet...
# For the time being, I wrote the regex that matches best our code.
# (except for the services with their export_ and types_ ...)
# We will see about tests later...
# See https://pylint.readthedocs.io/en/latest/user_guide/messages/convention/invalid-name.html#multiple-naming-styles-for-custom-regular-expressions

# Camel case with capital letter first
class-rgx = '([A-Z][a-z]*)+$'
module-rgx = '([A-Z][a-z]*)+$'

# Attributes, variables, functions and methods
# are camelCase, but can start with one or two understcore
attr-rgx = '(?:_*[a-z]+([A-Z][a-z]*)*)$'
variable-rgx = '(?:_*[a-z]+([A-Z][a-z]*)*)$'
function-rgx = '(?:_*[a-z]+([A-Z][a-z]*)*)$'
method-rgx = '(?:_*[a-z]+([A-Z][a-z]*)*)$'

argument-naming-style = "camelCase"

[tool.pylint.main]
# Files or directories to be skipped. They should be base names, not paths.
ignore = [".svn", ".git"]

# List of module names for which member attributes should not be checked (useful
# for modules/projects where namespaces are manipulated during runtime and thus
# existing member attributes cannot be deduced by static analysis). It supports
# qualified module names, as well as Unix pattern matching.
ignored-modules = ["MySQLdb", "numpy"]

# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use, and will cap the count on Windows to
# avoid hangs.
jobs = 0

[tool.pylint.typecheck]
# List of decorators that change the signature of a decorated function.
signature-mutators = []

[tool.pylint.format]

# Maximum number of characters on a single line.
max-line-length = 130

[tool.pylint."messages control"]
disable = ["R0903","I0011","c-extension-no-member"]

[tool.pylint.reports]
# Set the output format. Available formats are text, parseable, colorized, json
# and msvs (visual studio). You can also give a reporter class, e.g.
# mypackage.mymodule.MyReporterClass.
output-format = "colorized"
6 changes: 3 additions & 3 deletions src/WebAppDIRAC/WebApp/handler/UPHandler.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import base64
import zlib
import json
import zlib

from DIRAC import S_OK
from DIRAC.Core.Utilities import DEncode
from DIRAC.Core.DISET.ThreadConfig import ThreadConfig
from DIRAC.Core.Tornado.Server.private.BaseRequestHandler import authorization
from DIRAC.Core.Utilities import DEncode
from DIRAC.FrameworkSystem.Client.UserProfileClient import UserProfileClient
from DIRAC.Core.Tornado.Server.TornadoREST import authorization

from WebAppDIRAC.Lib.WebHandler import WebHandler, WErr

Expand Down

0 comments on commit df9087e

Please sign in to comment.