Skip to content

Commit

Permalink
Fix linting and pylint configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
eht16 committed Jan 1, 2023
1 parent b651483 commit f76dddc
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion geany/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@
"honeypot", # for pastebin
"mezzanine_pagedown",
"mezzanine_sync_pages.apps.MezzanineSyncPagesAppConfig",
#"shortener", # disabled until it is fixed for Django 4.0 or we remove it completely
# "shortener", # disabled until it is fixed for Django 4.0 or we remove it completely
PACKAGE_NAME_FILEBROWSER,
PACKAGE_NAME_GRAPPELLI,
)
Expand Down
6 changes: 3 additions & 3 deletions geany/sitemaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@ def get_dynamic_items(self):
return []

# ----------------------------------------------------------------------
def changefreq(self, obj): # pylint: disable=unused-argument
def changefreq(self, item): # pylint: disable=unused-argument
return 'monthly'

# ----------------------------------------------------------------------
def location(self, obj): # pylint: disable=unused-argument
return self._url_mapping[obj.name]
def location(self, item):
return self._url_mapping[item.name]

# ----------------------------------------------------------------------
def get_urls(self, page=1, site=None, protocol=None):
Expand Down
2 changes: 1 addition & 1 deletion geany/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
path('captcha/', include('captcha.urls')),

# URL Shortener
#path('s/', include('urlshortener.urls')), # disabled until it is fixed for Django 4.0
# path('s/', include('urlshortener.urls')), # disabled until it is fixed for Django 4.0

# /news/ News
path('news/', include('news.urls')),
Expand Down
2 changes: 1 addition & 1 deletion pastebin/highlight.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class NakedHtmlFormatter(HtmlFormatter):
"""Do not wrap the code in <div> or <code> tags (Pygments default)"""

# ----------------------------------------------------------------------
def wrap(self, source, outfile):
def wrap(self, source):
return self._wrap_code(source)

# ----------------------------------------------------------------------
Expand Down
18 changes: 8 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ include_trailing_comma = true
skip = local_settings.py,local_settings.docker.py

# the following sections are for pylint
[MASTER]
[pylint.main]
ignore=.git
ignore-patterns=local_settings.py,local_settings.docker.py
persistent=no
Expand All @@ -70,30 +70,28 @@ load-plugins=
pylint.extensions.overlapping_exceptions,
pylint.extensions.redefined_variable_type

[MESSAGES CONTROL]
[pylint]
disable=
empty-docstring,
logging-format-interpolation,
missing-docstring,
no-else-return,
no-self-use
no-else-return

[REPORTS]
[pylint.reports]
output-format=parseable
files-output=no
reports=no

[FORMAT]
[pylint.format]
max-line-length=100

[VARIABLES]
[pylint.variables]
dummy-variables-rgx=_|dummy

[DESIGN]
[pylint.design]
min-public-methods=0
max-attributes=10
max-args=7
max-parents=9

[EXCEPTIONS]
[pylint.exceptions]
overgeneral-exceptions=

0 comments on commit f76dddc

Please sign in to comment.