Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: url attribute type validation#672

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
bednar merged 4 commits intoinfluxdata:masterfromVitalyChait:patch-1
Sep 24, 2024
Merged

fix: url attribute type validation#672

bednar merged 4 commits intoinfluxdata:masterfromVitalyChait:patch-1
Sep 24, 2024

Conversation

VitalyChait
Copy link
Contributor

@VitalyChaitVitalyChait commentedSep 17, 2024
edited
Loading

fix: added type validation to an attribute in client object

Proposed Changes

It is possible to pass "None" by mistake to the InfluxDBClient object.
I propose to do a quick sanity check on it.

Traceback example:
client_obj = InfluxDBClient(url=url, token=token, org=org)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "vitaly.chait/.local/lib/python3.12/site-packages/influxdb_client/client/influxdb_client.py", line 63, in init
super().init(url=url, token=token, debug=debug, timeout=timeout, enable_gzip=enable_gzip, org=org,
File "vitaly.chait/.local/lib/python3.12/site-packages/influxdb_client/client/_base.py", line 56, in init
if self.url.endswith("/"):
^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'endswith'
Exception ignored in: <function InfluxDBClient.del at 0x7ff5627789a0>
Traceback (most recent call last):
File "vitaly.chait/.local/lib/python3.12/site-packages/influxdb_client/client/influxdb_client.py", line 319, in del
if self.api_client:
^^^^^^^^^^^^^^^
AttributeError: 'InfluxDBClient' object has no attribute 'api_client'

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • pytest tests completes successfully
  • Commit messages areconventional
  • SignCLA (if not already signed)

@codecov-commenter
Copy link

codecov-commenter commentedSep 17, 2024
edited
Loading

⚠️ Please install the'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.47%. Comparing base(70ce8cb) to head(9da8314).
Report is 9 commits behind head on master.

❗ Your organization needs to install theCodecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@##           master     #672   +/-   ##=======================================  Coverage   90.47%   90.47%           =======================================  Files          40       40             Lines        3526     3528    +2     =======================================+ Hits         3190     3192    +2  Misses        336      336
FlagCoverage Δ
90.47% <100.00%> (+0.29%)⬆️

Flags with carried forward coverage won't be shown.Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report?Share it here.

Copy link
Contributor

@bednarbednar left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@VitalyChait, thank you for your PR! 👍

Could you please add tests to cover your changes? This will ensure that your additions work as intended and maintain the integrity of the project.

VitalyChait reacted with thumbs up emoji
Copy link
Contributor

@bednarbednar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM 🚀

@bednarbednar added this to the1.47.0 milestoneSep 24, 2024
@bednarbednar merged commit3d70dbd intoinfluxdata:masterSep 24, 2024
15 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@bednarbednarbednar approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
1.47.0
Development

Successfully merging this pull request may close these issues.

3 participants
@VitalyChait@codecov-commenter@bednar

[8]ページ先頭

©2009-2025 Movatter.jp