Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Commit

Permalink
Make CI pass for 3.11
Browse files Browse the repository at this point in the history
- Manually install deps for CI run in action
- Stop running pylint for now so we can pass in 3.11: pylint-dev/pylint#5920
- Remove config from .pylint that pylint said to do
- Fix tests to pass
  • Loading branch information
Cooper Ry Lees committed Jul 12, 2022
1 parent 8383d69 commit dd56e0e
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 105 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ jobs:
PTR_INTEGRATION: 1
pythonioencoding: utf-8
run: |
python -m pip install -r requirements.txt
python ci.py
1 change: 1 addition & 0 deletions .github/workflows/ci_latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ jobs:
PTR_INTEGRATION: 1
pythonioencoding: utf-8
run: |
python -m pip install -r requirements.txt
python ci.py || echo "!! FAILED: Please look into - returned $?"
94 changes: 1 addition & 93 deletions .pylint
Original file line number Diff line number Diff line change
Expand Up @@ -54,92 +54,7 @@ confidence=
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=print-statement,
parameter-unpacking,
unpacking-in-except,
old-raise-syntax,
backtick,
long-suffix,
old-ne-operator,
old-octal-literal,
import-star-module-level,
non-ascii-bytes-literal,
raw-checker-failed,
bad-inline-option,
locally-disabled,
locally-enabled,
file-ignored,
suppressed-message,
useless-suppression,
deprecated-pragma,
apply-builtin,
basestring-builtin,
buffer-builtin,
cmp-builtin,
coerce-builtin,
execfile-builtin,
file-builtin,
long-builtin,
raw_input-builtin,
reduce-builtin,
standarderror-builtin,
unicode-builtin,
xrange-builtin,
coerce-method,
delslice-method,
getslice-method,
setslice-method,
no-absolute-import,
old-division,
dict-iter-method,
dict-view-method,
next-method-called,
metaclass-assignment,
indexing-exception,
raising-string,
reload-builtin,
oct-method,
hex-method,
nonzero-method,
cmp-method,
input-builtin,
round-builtin,
intern-builtin,
unichr-builtin,
map-builtin-not-iterating,
zip-builtin-not-iterating,
range-builtin-not-iterating,
filter-builtin-not-iterating,
using-cmp-argument,
eq-without-hash,
div-method,
idiv-method,
rdiv-method,
exception-message-attribute,
invalid-str-codec,
sys-max-int,
bad-python3-import,
deprecated-string-function,
deprecated-str-translate-call,
deprecated-itertools-function,
deprecated-types-field,
next-method-defined,
dict-items-not-iterating,
dict-keys-not-iterating,
dict-values-not-iterating,
missing-docstring,
bad-continuation,
global-statement,
invalid-name,
duplicate-code,
unused-argument,
missing-docstring,
function-redefined,
too-many-public-methods,
protected-access,
logging-format-interpolation,
no-self-use,
ungrouped-imports,
disable=ungrouped-imports,
fixme,
too-many-function-args,
logging-fstring-interpolation,
Expand Down Expand Up @@ -323,13 +238,6 @@ max-line-length=90
# Maximum number of lines in a module
max-module-lines=2000

# List of optional constructs for which whitespace checking is disabled. `dict-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
# `empty-line` allows space-only lines.
no-space-check=trailing-comma,
dict-separator

# Allow the body of a class to be on the same line as the declaration if body
# contains single statement.
single-line-class-stmt=no
Expand Down
4 changes: 2 additions & 2 deletions ptr.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Can remove once we're >= 3.7 so asyncio has a .run() method
# pyre-ignore-all-errors[0]
# pyre-ignore-all-errors[16]
# pyre-ignore-all-errors[21]

import argparse
import ast
Expand Down Expand Up @@ -36,8 +37,7 @@
# Help users on older alphas
import tomli as tomllib
else:
# pyre-ignore: Undefined import [21]
import tomli as tomllib
import tomli as tomllib # type: ignore


LOG = logging.getLogger(__name__)
Expand Down
8 changes: 4 additions & 4 deletions ptr_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ def test_test_steps_runner(self, mock_print: Mock) -> None:
self.loop.run_until_complete(
ptr._test_steps_runner(*tsr_params) # pyre-ignore
),
(None, 8) if no_pyre else (None, 9),
(None, 7) if no_pyre else (None, 8),
)

# Test we run coverage when required_coverage does not exist
Expand All @@ -574,7 +574,7 @@ def test_test_steps_runner(self, mock_print: Mock) -> None:
self.loop.run_until_complete(
ptr._test_steps_runner(*tsr_params) # pyre-ignore
),
(None, 8) if no_pyre else (None, 9),
(None, 7) if no_pyre else (None, 8),
)

# Run everything but black + no print cov
Expand All @@ -585,11 +585,11 @@ def test_test_steps_runner(self, mock_print: Mock) -> None:
self.assertEqual(
# pyre-ignore[6]: Tests ...
self.loop.run_until_complete(ptr._test_steps_runner(*tsr_params)),
(None, 7) if no_pyre else (None, 8),
(None, 6) if no_pyre else (None, 7),
)

# Run everything but test_suite with print_cov
expected_no_pyre_tests = (None, 7) if no_pyre else (None, 8)
expected_no_pyre_tests = (None, 6) if no_pyre else (None, 7)
etp = deepcopy(ptr_tests_fixtures.EXPECTED_TEST_PARAMS)
del etp["test_suite"]
del etp["required_coverage"]
Expand Down
6 changes: 3 additions & 3 deletions ptr_tests_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def run_until_complete(self, *args, **kwargs) -> int:
"run_black": True,
"run_mypy": True,
"run_flake8": True,
"run_pylint": True,
"run_pylint": False,
"run_pyre": True,
}

Expand Down Expand Up @@ -222,7 +222,7 @@ def run_until_complete(self, *args, **kwargs) -> int:
run_black = true
run_mypy = true
run_flake8 = true
run_pylint = true
run_pylint = false
run_pyre = true
"""

Expand All @@ -239,7 +239,7 @@ def run_until_complete(self, *args, **kwargs) -> int:
run_black = true
run_mypy = true
run_flake8 = true
run_pylint = true
run_pylint = false
run_pyre = true
"""

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ run_usort = true
run_black = true
run_mypy = true
run_flake8 = true
run_pylint = true
run_pylint = false
run_pyre = true
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"run_mypy": True,
# Run flake8 or not
"run_flake8": True,
# Run pylint or not - Disabled until 3.9 Support
"run_pylint": True,
# Run pylint or not - Disabled due to python3.11 support
"run_pylint": False,
# Run pyre or not
"run_pyre": True,
}
Expand Down

0 comments on commit dd56e0e

Please sign in to comment.