Skip to content

Commit be7e1e1

Browse files
committed
Update Codecov action
1 parent 3854585 commit be7e1e1

File tree

9 files changed

+28
-109
lines changed

9 files changed

+28
-109
lines changed

.github/workflows/publish.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
python-version: [ 3.7, 3.8 ]
18+
python-version: [ 3.11 ]
1919
steps:
20-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v4
2121
- name: Set up Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v1
22+
uses: actions/setup-python@v5
2323
with:
2424
python-version: ${{ matrix.python-version }}
2525
- name: Install pylint
@@ -32,31 +32,31 @@ jobs:
3232
runs-on: ubuntu-latest
3333
strategy:
3434
matrix:
35-
python-version: [ 3.7, 3.8 ]
35+
python-version: [ 3.11 ]
3636
steps:
37-
- uses: actions/checkout@v2
37+
- uses: actions/checkout@v4
3838
- name: Set up Python ${{ matrix.python-version }}
39-
uses: actions/setup-python@v1
39+
uses: actions/setup-python@v5
4040
with:
4141
python-version: ${{ matrix.python-version }}
4242
- name: Install pytest
4343
run: pip install pytest-cov
4444
- name: Test with pytest
4545
run: pytest -v --doctest-modules --cov=./
4646
- name: Upload coverage to Codecov
47-
uses: codecov/codecov-action@v1
47+
uses: codecov/codecov-action@v5.4.3
4848
with:
4949
fail_ci_if_error: true
5050

5151
publish:
5252
needs: test
5353
runs-on: ubuntu-latest
5454
steps:
55-
- uses: actions/checkout@v2
56-
- name: Set up Python 3.8
57-
uses: actions/setup-python@v1
55+
- uses: actions/checkout@v4
56+
- name: Set up Python 3.11
57+
uses: actions/setup-python@v5
5858
with:
59-
python-version: 3.8
59+
python-version: 3.11
6060
- name: Install twine
6161
run: pip install twine wheel
6262
- name: Build package

.github/workflows/test.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
python-version: [ 3.7, 3.8 ]
18+
python-version: [ 3.11 ]
1919
steps:
20-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v4
2121
- name: Set up Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v1
22+
uses: actions/setup-python@v5
2323
with:
2424
python-version: ${{ matrix.python-version }}
2525
- name: Install pylint
@@ -32,18 +32,18 @@ jobs:
3232
runs-on: ubuntu-latest
3333
strategy:
3434
matrix:
35-
python-version: [ 3.7, 3.8 ]
35+
python-version: [ 3.11 ]
3636
steps:
37-
- uses: actions/checkout@v2
37+
- uses: actions/checkout@v4
3838
- name: Set up Python ${{ matrix.python-version }}
39-
uses: actions/setup-python@v1
39+
uses: actions/setup-python@v5
4040
with:
4141
python-version: ${{ matrix.python-version }}
4242
- name: Install pytest
4343
run: pip install pytest-cov
4444
- name: Test with pytest
4545
run: pytest -v --doctest-modules --cov=./
4646
- name: Upload coverage to Codecov
47-
uses: codecov/codecov-action@v1
47+
uses: codecov/codecov-action@v5.4.3
4848
with:
4949
fail_ci_if_error: true

QLog/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def QLogError(data):
4343
log(LogLevel.ERROR, data)
4444

4545

46-
loggers: [Logger] = []
46+
loggers: list[Logger] = []
4747

4848

4949
def log(level: LogLevel, data):

QLog/azure_system_logger.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ def __init__(self, log_level=LogLevel.INFO):
1414
self.log_level = log_level
1515
if self.log_level is LogLevel.INFO:
1616
logging.getLogger().setLevel(logging.INFO)
17-
if self.log_level is LogLevel.WARNING:
17+
elif self.log_level is LogLevel.WARNING:
1818
logging.getLogger().setLevel(logging.WARNING)
19-
if self.log_level is LogLevel.ERROR:
19+
elif self.log_level is LogLevel.ERROR:
2020
logging.getLogger().setLevel(logging.ERROR)
2121
else:
2222
logging.getLogger().setLevel(logging.DEBUG)

QLog/console_logger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class ConsoleLogger(Logger):
1111
def __init__(self, log_level=LogLevel.HIGHLIGHT):
1212
self.log_level = log_level
1313

14-
escape = u'\u001b'
14+
escape = '\u001b'
1515
ansi_bold = '1m'
1616
ansi_reset = '0m'
1717
ansi_text_color = '37m'

QLog/log_level.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def ansi_color(self):
2222
def ansi_color_sequence(self):
2323
""" Returns ANSI color sequence """
2424

25-
return u'\u001b' + '[' + str(self.ansi_color)
25+
return '\u001b[' + str(self.ansi_color)
2626

2727
@property
2828
def python_log_level(self):

QLog/system_logger.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ def __init__(self, log_level=LogLevel.INFO):
1414
self.log_level = log_level
1515
if self.log_level is LogLevel.INFO:
1616
logging.getLogger().setLevel(logging.INFO)
17-
if self.log_level is LogLevel.WARNING:
17+
elif self.log_level is LogLevel.WARNING:
1818
logging.getLogger().setLevel(logging.WARNING)
19-
if self.log_level is LogLevel.ERROR:
19+
elif self.log_level is LogLevel.ERROR:
2020
logging.getLogger().setLevel(logging.ERROR)
2121
else:
2222
logging.getLogger().setLevel(logging.DEBUG)

pylintrc

Lines changed: 2 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -60,85 +60,6 @@ confidence=
6060
# --enable=similarities". If you want to run only the classes checker, but have
6161
# no Warning level messages displayed, use "--disable=all --enable=classes
6262
# --disable=W".
63-
disable=print-statement,
64-
parameter-unpacking,
65-
unpacking-in-except,
66-
old-raise-syntax,
67-
backtick,
68-
long-suffix,
69-
old-ne-operator,
70-
old-octal-literal,
71-
import-star-module-level,
72-
non-ascii-bytes-literal,
73-
raw-checker-failed,
74-
bad-inline-option,
75-
locally-disabled,
76-
file-ignored,
77-
suppressed-message,
78-
useless-suppression,
79-
deprecated-pragma,
80-
use-symbolic-message-instead,
81-
apply-builtin,
82-
basestring-builtin,
83-
buffer-builtin,
84-
cmp-builtin,
85-
coerce-builtin,
86-
execfile-builtin,
87-
file-builtin,
88-
long-builtin,
89-
raw_input-builtin,
90-
reduce-builtin,
91-
standarderror-builtin,
92-
unicode-builtin,
93-
xrange-builtin,
94-
coerce-method,
95-
delslice-method,
96-
getslice-method,
97-
setslice-method,
98-
no-absolute-import,
99-
old-division,
100-
dict-iter-method,
101-
dict-view-method,
102-
next-method-called,
103-
metaclass-assignment,
104-
indexing-exception,
105-
raising-string,
106-
reload-builtin,
107-
oct-method,
108-
hex-method,
109-
nonzero-method,
110-
cmp-method,
111-
input-builtin,
112-
round-builtin,
113-
intern-builtin,
114-
unichr-builtin,
115-
map-builtin-not-iterating,
116-
zip-builtin-not-iterating,
117-
range-builtin-not-iterating,
118-
filter-builtin-not-iterating,
119-
using-cmp-argument,
120-
eq-without-hash,
121-
div-method,
122-
idiv-method,
123-
rdiv-method,
124-
exception-message-attribute,
125-
invalid-str-codec,
126-
sys-max-int,
127-
bad-python3-import,
128-
deprecated-string-function,
129-
deprecated-str-translate-call,
130-
deprecated-itertools-function,
131-
deprecated-types-field,
132-
next-method-defined,
133-
dict-items-not-iterating,
134-
dict-keys-not-iterating,
135-
dict-values-not-iterating,
136-
deprecated-operator-function,
137-
deprecated-urllib-function,
138-
xreadlines-attribute,
139-
deprecated-sys-function,
140-
exception-escape,
141-
comprehension-escape
14263

14364
# Enable the message, report, category or checker with the given id(s). You can
14465
# either give multiple identifier separated by comma (,) or put this option
@@ -336,8 +257,6 @@ max-module-lines=1000
336257
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
337258
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
338259
# `empty-line` allows space-only lines.
339-
no-space-check=trailing-comma,
340-
dict-separator
341260

342261
# Allow the body of a class to be on the same line as the declaration if body
343262
# contains single statement.
@@ -594,5 +513,5 @@ max-complexity=5
594513

595514
# Exceptions that will emit a warning when being caught. Defaults to
596515
# "BaseException, Exception".
597-
overgeneral-exceptions=BaseException,
598-
Exception
516+
overgeneral-exceptions=builtins.BaseException,
517+
builtins.Exception

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
HERE = os.path.abspath(os.path.dirname(__file__))
77

8-
with open(os.path.join(HERE, "README.md")) as fid:
8+
with open(os.path.join(HERE, "README.md"), encoding="utf-8") as fid:
99
README = fid.read()
1010

1111
setup(

0 commit comments

Comments
 (0)