-
Notifications
You must be signed in to change notification settings - Fork 20
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
Style: aligned black with ruff settings, added pyupgrade #61
Closed
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
08dc4ae
fix: aligning black with rust, and added isort
fstagni 46e7e57
style: ran black with line-length=120
fstagni 4357732
test: added pyupgrade and flyint, removed isort
fstagni 75291b7
style: ran pyupgrade
fstagni 31e8780
test: added ruff rules for pyupgrade and flynt, removed from precommit
fstagni 35faf2a
fix: removed .gitlab-ci.yml file
fstagni 7680ed2
fix: bumped pydantic version
fstagni 574e7c8
fix: workaround for https://github.com/tiangolo/typer/issues/533
fstagni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/[email protected]) | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
|
@@ -7,8 +6,8 @@ | |
from ._client import Dirac | ||
|
||
try: | ||
from ._patch import __all__ as _patch_all | ||
from ._patch import * # pylint: disable=unused-wildcard-import | ||
from ._patch import __all__ as _patch_all | ||
except ImportError: | ||
_patch_all = [] | ||
from ._patch import patch_sdk as _patch_sdk | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/[email protected]) | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
|
@@ -40,28 +39,18 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential | |
self, *, endpoint: str = "", **kwargs: Any | ||
) -> None: | ||
self._config = DiracConfiguration(**kwargs) | ||
self._client: PipelineClient = PipelineClient( | ||
base_url=endpoint, config=self._config, **kwargs | ||
) | ||
self._client: PipelineClient = PipelineClient(base_url=endpoint, config=self._config, **kwargs) | ||
|
||
client_models = { | ||
k: v for k, v in _models.__dict__.items() if isinstance(v, type) | ||
} | ||
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} | ||
self._serialize = Serializer(client_models) | ||
self._deserialize = Deserializer(client_models) | ||
self._serialize.client_side_validation = False | ||
self.well_known = WellKnownOperations( | ||
self._client, self._config, self._serialize, self._deserialize | ||
) | ||
self.well_known = WellKnownOperations(self._client, self._config, self._serialize, self._deserialize) | ||
self.auth = AuthOperations( # pylint: disable=abstract-class-instantiated | ||
self._client, self._config, self._serialize, self._deserialize | ||
) | ||
self.config = ConfigOperations( | ||
self._client, self._config, self._serialize, self._deserialize | ||
) | ||
self.jobs = JobsOperations( | ||
self._client, self._config, self._serialize, self._deserialize | ||
) | ||
self.config = ConfigOperations(self._client, self._config, self._serialize, self._deserialize) | ||
self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize) | ||
|
||
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse: | ||
"""Runs the network request through the client's chained policies. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.5, generator: @autorest/[email protected]) | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
|
@@ -20,30 +19,18 @@ class DiracConfiguration(Configuration): # pylint: disable=too-many-instance-at | |
""" | ||
|
||
def __init__(self, **kwargs: Any) -> None: | ||
super(DiracConfiguration, self).__init__(**kwargs) | ||
super().__init__(**kwargs) | ||
|
||
kwargs.setdefault("sdk_moniker", "dirac/{}".format(VERSION)) | ||
kwargs.setdefault("sdk_moniker", f"dirac/{VERSION}") | ||
self._configure(**kwargs) | ||
|
||
def _configure(self, **kwargs: Any) -> None: | ||
self.user_agent_policy = kwargs.get( | ||
"user_agent_policy" | ||
) or policies.UserAgentPolicy(**kwargs) | ||
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy( | ||
**kwargs | ||
) | ||
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs) | ||
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs) | ||
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs) | ||
self.logging_policy = kwargs.get( | ||
"logging_policy" | ||
) or policies.NetworkTraceLoggingPolicy(**kwargs) | ||
self.http_logging_policy = kwargs.get( | ||
"http_logging_policy" | ||
) or policies.HttpLoggingPolicy(**kwargs) | ||
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs) | ||
self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs) | ||
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs) | ||
self.custom_hook_policy = kwargs.get( | ||
"custom_hook_policy" | ||
) or policies.CustomHookPolicy(**kwargs) | ||
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy( | ||
**kwargs | ||
) | ||
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs) | ||
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs) | ||
self.authentication_policy = kwargs.get("authentication_policy") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we do this at the file level with a comment explaining why?
https://beta.ruff.rs/docs/configuration/#error-suppression