Skip to content

Commit

Permalink
Upgrade pylint to 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jacebrowning committed Jan 15, 2025
1 parent d3a630d commit 8d2802b
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 79 deletions.
8 changes: 1 addition & 7 deletions .pylint.ini
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ disable=
unsubscriptable-object,
singleton-comparison,
subprocess-run-check,
invalid-field-call,

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down Expand Up @@ -409,10 +410,3 @@ known-standard-library=

# Force import order to recognize a module as part of a third party library.
known-third-party=enchant


[EXCEPTIONS]

# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
overgeneral-exceptions=Exception
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"multidict",
"mypy",
"noninteractive",
"overgeneral",
"pipx",
"pluginmanager",
"proto",
Expand Down
77 changes: 29 additions & 48 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 7 additions & 10 deletions pomace/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,11 @@ def find(self) -> Optional[WebDriverElement]:
except ElementDoesNotExist:
log.debug(f"{self} unable to find element")
return None
else:
self.index = index
html = (
element.outer_html.replace("\n", "").replace("\t", "").replace(" ", "")
)
log.debug(f"{self} found element: {html}")
return element

self.index = index
html = element.outer_html.replace("\n", "").replace("\t", "").replace(" ", "")
log.debug(f"{self} found element: {html}")
return element

def score(self, value: int, *, limit: int = 0) -> bool:
previous = self.uses
Expand Down Expand Up @@ -209,9 +207,8 @@ def _perform_action(self, function: Callable, *args, **kwargs) -> bool:
except WebDriverException as e:
log.debug(e)
return False
else:
self._verb.post_action(previous_url, delay, wait, start)
return True
self._verb.post_action(previous_url, delay, wait, start)
return True

def clean(self, page, *, force: bool = False) -> int:
unused_locators = []
Expand Down
13 changes: 5 additions & 8 deletions pomace/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ def is_identifier(value: str) -> bool:
UUID(value)
except ValueError:
return False
else:
return True
return True


class URL:
Expand Down Expand Up @@ -196,9 +195,8 @@ def __getattr__(self, name):
alias = ALIASES[name]
except KeyError:
return super().__getattribute__(name)
else:
log.debug(f"Mapped fake attribute {alias!r} to {name!r}")
return getattr(self, alias)
log.debug(f"Mapped fake attribute {alias!r} to {name!r}")
return getattr(self, alias)

@property
def name(self) -> str:
Expand Down Expand Up @@ -227,9 +225,8 @@ def __getattr__(self, name):
alias = ALIASES[name]
except KeyError:
return super().__getattribute__(name)
else:
log.debug(f"Mapped fake attribute {alias!r} to {name!r}")
method = getattr(self._generator, alias)
log.debug(f"Mapped fake attribute {alias!r} to {name!r}")
method = getattr(self._generator, alias)
return method()

@property
Expand Down
7 changes: 1 addition & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ inflection = "^0.5.1"
minilog = "^2.3"
nest-asyncio = "^1.5.5"

multidict = ">=6.1"
pyyaml = ">=6.0.2"
yarl = ">=1.18.3"
jellyfish = ">=1.1.3"

[tool.poetry.dev-dependencies]

# Formatters
Expand All @@ -88,7 +83,7 @@ isort = "^5.10"
mypy = "^1.3"
types-requests = "*"
pydocstyle = "*"
pylint = "~2.15"
pylint = "~3.3"

# Testing
pytest = "^7.3"
Expand Down

0 comments on commit 8d2802b

Please sign in to comment.