Skip to content

Commit

Permalink
Bump pylint from 2.10.2 to 2.12.2 in /tests (signalfx#2024)
Browse files Browse the repository at this point in the history
* Bump pylint from 2.10.2 to 2.12.2 in /tests

Bumps [pylint](https://github.com/PyCQA/pylint) from 2.10.2 to 2.12.2.
- [Release notes](https://github.com/PyCQA/pylint/releases)
- [Changelog](https://github.com/PyCQA/pylint/blob/main/ChangeLog)
- [Commits](pylint-dev/pylint@v2.10.2...v2.12.2)

---
updated-dependencies:
- dependency-name: pylint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Ignore consider-using-f-string

* Fix pylint issues

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jcheng-splunk <[email protected]>
  • Loading branch information
dependabot[bot] and jeffreyc-splunk authored Dec 14, 2021
1 parent 9f6bd16 commit efcfacc
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/monitors/diskio/diskio_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_diskio():
"disk_ops.pending",
]
)
elif sys.platform == "win32" or sys.platform == "cygwin":
elif sys.platform in ("win32", "cygwin"):
expected_metrics.extend(
[
"disk_ops.avg_read",
Expand Down
2 changes: 1 addition & 1 deletion tests/monitors/http/http_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def check_values(dps, status_code, code=1, regex=1, cert=1):
assert dp.value.intValue == regex
if dp.metric == METRIC_CODE_MATCH:
assert dp.value.intValue > 0 or code
if dp.metric == METRIC_TIME or dp.metric == METRIC_CERT_EXPIRY:
if dp.metric in (METRIC_TIME, METRIC_CERT_EXPIRY):
assert dp.value.doubleValue > 0


Expand Down
2 changes: 1 addition & 1 deletion tests/monitors/logstash/logstash_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_logstash_tcp_client(version):
) as logstash_cont:
copy_file_content_into_container(SAMPLE_EVENTS, logstash_cont, "tmp/events.log")
copy_file_content_into_container(
PIPELINE_CONF.read_text(), logstash_cont, "/usr/share/logstash/pipeline/test.conf"
PIPELINE_CONF.read_text(encoding="utf-8"), logstash_cont, "/usr/share/logstash/pipeline/test.conf"
)
host = container_ip(logstash_cont)

Expand Down
4 changes: 2 additions & 2 deletions tests/monitors/logstash_tcp/logstash_tcp_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_logstash_tcp_client(version):
) as logstash_cont:
copy_file_content_into_container(SAMPLE_EVENTS, logstash_cont, "tmp/events.log")
copy_file_content_into_container(
PIPELINE_CONF.read_text(), logstash_cont, "/usr/share/logstash/pipeline/test.conf"
PIPELINE_CONF.read_text(encoding="utf-8"), logstash_cont, "/usr/share/logstash/pipeline/test.conf"
)
host = container_ip(logstash_cont)

Expand Down Expand Up @@ -95,7 +95,7 @@ def test_logstash_tcp_server(version):
copy_file_content_into_container(
# The pipeline conf is written for server mode so patch it to
# act as a client.
PIPELINE_CONF.read_text()
PIPELINE_CONF.read_text(encoding="utf-8")
.replace('mode => "server"', 'mode => "client"')
.replace('host => "0.0.0.0"', f'host => "{agent_host}"')
.replace("port => 8900", f"port => {listen_port}"),
Expand Down
2 changes: 1 addition & 1 deletion tests/monitors/vmem/vmem_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"vmpage_number.shmem_pmdmapped",
}
)
elif sys.platform == "win32" or sys.platform == "cygwin":
elif sys.platform in ("win32", "cygwin"):
METRICS.update({"vmpage.swap.in_per_second", "vmpage.swap.out_per_second", "vmpage.swap.total_per_second"})


Expand Down
1 change: 1 addition & 0 deletions tests/pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ disable=print-statement,
ungrouped-imports,
f-string-without-interpolation,
duplicate-code,
consider-using-f-string,
bad-continuation # We use black so this shouldn't ever be relevant

# Enable the message, report, category or checker with the given id(s). You can
Expand Down
2 changes: 1 addition & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mysql-connector-python==8.0.27
netifaces==0.11.0
protobuf==3.19.1
psutil==5.8.0
pylint==2.10.2
pylint==2.12.2
pytest-html==3.1.1
pytest-rerunfailures==10.2
pytest-xdist==2.5.0
Expand Down

0 comments on commit efcfacc

Please sign in to comment.