Move to 'official' pylint hook

This commit is contained in:
Jeff Epler 2023-01-31 08:06:47 -06:00
parent 0c4d08ff36
commit e7479f6d09
No known key found for this signature in database
GPG key ID: D5BF15AB975AB4DE
4 changed files with 9 additions and 15 deletions

View file

@ -22,14 +22,11 @@ repos:
rev: v1.1.0
hooks:
- id: reuse
- repo: local
- repo: https://github.com/pycqa/pylint
rev: v2.15.5
hooks:
- id: pylint
name: pylint
entry: pylint
language: python
types: [python]
additional_dependencies: [beautifulsoup4, "pylint==2.13.5", requests, adafruit-circuitpython-datetime, click, python-dateutil, leapseconddata]
- id: pylint
additional_dependencies: [beautifulsoup4, requests, adafruit-circuitpython-datetime, click, python-dateutil, leapseconddata]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:

View file

@ -10,4 +10,3 @@ disable=duplicate-code,line-too-long,protected-access
[BASIC]
argument-rgx=[a-z][a-z0-9_]*
variable-naming-style=any
good_names=dt,t,i,j,k,ex,_

View file

@ -108,9 +108,7 @@ class WWVBRoundtrip(unittest.TestCase):
minute = minute.next_minute()
self.assertTrue(any_leap_second)
def test_cover_fill_pm_timecode_extended( # pylint: disable=no-self-use
self,
) -> None:
def test_cover_fill_pm_timecode_extended(self) -> None:
"""Get full coverage of the function pm_timecode_extended"""
for dt in (
datetime.datetime(1992, 1, 1),

View file

@ -42,7 +42,7 @@ NIST_URL = "https://www.nist.gov/pml/time-and-frequency-division/atomic-standard
def _get_text(url: str) -> str:
"""Get a local file or a http/https URL"""
if url.startswith("http"):
with requests.get(url) as response:
with requests.get(url, timeout=30) as response:
return response.text
else:
return open(url, encoding="utf-8").read()
@ -87,7 +87,7 @@ def update_iersdata( # pylint: disable=too-many-locals, too-many-branches, too-
offsets.append(offs)
wwvb_text = requests.get(NIST_URL).text
wwvb_text = _get_text(NIST_URL)
wwvb_data = bs4.BeautifulSoup(wwvb_text, features="html.parser")
wwvb_dut1_table = wwvb_data.findAll("table")[2]
assert wwvb_dut1_table
@ -138,8 +138,8 @@ def update_iersdata( # pylint: disable=too-many-locals, too-many-branches, too-
code("# -*- python3 -*-")
code('"""File generated from public data - not subject to copyright"""')
code("# SPDX" "-FileCopyrightText: Public domain")
code("# SPDX" "-License-Identifier: CC0-1.0")
code("# SPDX" + "-FileCopyrightText: Public domain")
code("# SPDX" + "-License-Identifier: CC0-1.0")
code("# fmt: off")
code("# isort: skip_file")
code("# pylint: disable=invalid-name")