TeKrop / overfast-api

⚡ Unofficial Overwatch 2 API, built with FastAPI, provides data on heroes, game modes, maps, and player careers
https://overfast-api.tekrop.fr
MIT License
95 stars 10 forks source link

Update refurb requirement from ^1.22.1 to ^2.0.0 #104

Closed dependabot[bot] closed 3 months ago

dependabot[bot] commented 3 months ago

Updates the requirements on refurb to permit the latest version.

Release notes

Sourced from refurb's releases.

Release v2.0.0

This new release greatly improves the type checking capabilities of Refurb. You might find that you are getting a lot more errors in your projects, as well as a few false positives. Please report any incorrect changes you might find!

Add better type deduction

Refurb now makes better use of Mypy's type deduction system, allowing Refurb to find more errors and with better accuracy.

For example, the following is not detected in older versions of Refurb:

nums = [[]]

if len(nums[0]): print("nums[0] is not empty")

With this new version of Refurb, the type of nums[0] is inferred as a list:

$ refurb file.py
file.py:3:4 [FURB115]: Replace `len(nums[0])` with `nums[0]`

While this new type deduction is a great improvement on what existed before, there is still a lot of room for improvement. If you find any typing related bugs, please report it!

Add use-isinstance-bool check (FURB191)

Don't check if a value is True or False using in, use an isinstance() call.

Bad:

if value in {True, False}:
    pass

Good:

if isinstance(value, bool):
    pass

Add use-str-method check (FURB190)

Don't use a lambda function to call a no-arg method on a string, use the name of the string method directly. It is faster, and often times improves readability.

Bad:

</tr></table> 

... (truncated)

Commits
  • 2e31f00 Release v2
  • d4e9ee3 Add better type deduction for sets, frozensets, and tuples to FURB115
  • ae0e502 Bump dev packages
  • ee2daae Add os.environ to copy-able mapping type list
  • 85ef890 Add use-isinstance-bool check
  • 43c63c8 Add better detection and error messages for len compatible types in FURB115 (...
  • d8ec9f4 Add better type deduction for mapping types
  • c30b449 Add type deduction for type aliases
  • 6b9035f Fix incorrect error message for FURB122
  • 60bb2f6 Fix newlines being printed in stringified strings
  • Additional commits viewable in compare view


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud