Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding ruff rule A #4232

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

Neema-Joju
Copy link

@Neema-Joju Neema-Joju commented Oct 22, 2024

Description

Address part of #4227

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • ruff check . (This test lints all discovered Python files. Adding rule A affects variable, argument, import, module names.)

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@Neema-Joju Neema-Joju requested a review from a team as a code owner October 22, 2024 01:55
Copy link

linux-foundation-easycla bot commented Oct 22, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link
Contributor

@xrmx xrmx left a comment

Choose a reason for hiding this comment

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

Maybe we can just skip the A instead?

docs/conf.py Outdated
@@ -47,7 +47,7 @@
# -- Project information -----------------------------------------------------

project = "OpenTelemetry Python"
copyright = "OpenTelemetry Authors" # pylint: disable=redefined-builtin
docs_copyright = "OpenTelemetry Authors" # pylint: disable=redefined-builtin
Copy link
Contributor

Choose a reason for hiding this comment

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

I am pretty sure we cannot change sphinx configuration for pleasing some lint rules 😅 see
https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-copyright

Copy link
Member

Choose a reason for hiding this comment

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

Can ignore this too

package-lock.json Outdated Show resolved Hide resolved
@@ -121,8 +121,8 @@ def _is_valid_value(value: object) -> bool:
parts = str(value).split(";")
is_valid_value = _VALUE_PATTERN.fullmatch(parts[0]) is not None
if len(parts) > 1: # one or more properties metadata
for property in parts[1:]:
if _PROPERT_PATTERN.fullmatch(property) is None:
for properties in parts[1:]:
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe prop instead since this looks like is one property?

Copy link
Author

@Neema-Joju Neema-Joju Oct 22, 2024

Choose a reason for hiding this comment

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

prop, properties or no change?

Copy link
Member

Choose a reason for hiding this comment

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

I would use prop

@@ -684,7 +684,7 @@ def start_span(
context = SpanContextShim(span.get_span_context())
return SpanShim(self, context, span)

def inject(self, span_context, format: object, carrier: object):
def inject(self, span_context, formats: object, carrier: object):
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure we can rename function parameters because a linter rule does not like it :)

Copy link
Member

Choose a reason for hiding this comment

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

Yes, in this case, I think we can just ignore it.

@emdneto emdneto mentioned this pull request Oct 22, 2024
4 tasks
@Neema-Joju
Copy link
Author

Maybe I'll just revert back all changes and just stick to adding rules. :)

@emdneto emdneto mentioned this pull request Nov 18, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants