Skip to content

Commit

Permalink
Increase stacklevel of warnings to appease flake8
Browse files Browse the repository at this point in the history
B028
  • Loading branch information
clenk committed Apr 21, 2023
1 parent 48ed801 commit 933bae0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/service/data_svc.py
Expand Up @@ -240,15 +240,15 @@ async def load_requirements_from_list(self, requirements: list):
return [RequirementSchema().load(entry) for entry in requirements]

async def load_adversary_file(self, filename, access):
warnings.warn("Function deprecated and will be removed in a future update. Use load_yaml_file", DeprecationWarning)
warnings.warn("Function deprecated and will be removed in a future update. Use load_yaml_file", DeprecationWarning, stacklevel=2)
await self.load_yaml_file(Adversary, filename, access)

async def load_source_file(self, filename, access):
warnings.warn("Function deprecated and will be removed in a future update. Use load_yaml_file", DeprecationWarning)
warnings.warn("Function deprecated and will be removed in a future update. Use load_yaml_file", DeprecationWarning, stacklevel=2)
await self.load_yaml_file(Source, filename, access)

async def load_objective_file(self, filename, access):
warnings.warn("Function deprecated and will be removed in a future update. Use load_yaml_file", DeprecationWarning)
warnings.warn("Function deprecated and will be removed in a future update. Use load_yaml_file", DeprecationWarning, stacklevel=2)
await self.load_yaml_file(Objective, filename, access)

async def load_yaml_file(self, object_class, filename, access):
Expand Down

0 comments on commit 933bae0

Please sign in to comment.