Skip to content

Commit

Permalink
refactor: Export imports from data_models and errors with *
Browse files Browse the repository at this point in the history
  • Loading branch information
ewuerger committed Aug 27, 2024
1 parent 87cb398 commit f814cfb
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 18 deletions.
20 changes: 2 additions & 18 deletions polarion_rest_api_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,6 @@

from polarion_rest_api_client.client import PolarionClient
from polarion_rest_api_client.clients.projects import ProjectClient
from polarion_rest_api_client.data_models import (
Document,
RenderingLayout,
SelectTestCasesBy,
TestRecord,
TestRun,
TextContent,
WorkItem,
WorkItemAttachment,
WorkItemLink,
)
from polarion_rest_api_client.errors import (
PolarionApiBaseException,
PolarionApiException,
PolarionApiInternalException,
PolarionApiUnexpectedException,
PolarionWorkItemException,
)
from polarion_rest_api_client.data_models import *
from polarion_rest_api_client.errors import *
from polarion_rest_api_client.old_client import OpenAPIPolarionProjectClient
15 changes: 15 additions & 0 deletions polarion_rest_api_client/data_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,21 @@
import json
import typing as t

__all__ = [
"Document",
"Layouter",
"RenderingLayout",
"RenderingProperties",
"SelectTestCasesBy",
"StatusItem",
"TestRecord",
"TestRun",
"TextContent",
"WorkItem",
"WorkItemAttachment",
"WorkItemLink",
]

BOOLEAN_RENDERING_PROPERTIES = ["fieldsAtEndAsTable", "hidden"]
RENDERING_LAYOUT_FIELDS = {
"fieldsAtEndAsTable": "fields_at_end_as_table",
Expand Down
8 changes: 8 additions & 0 deletions polarion_rest_api_client/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@

from . import data_models as dm

__all__ = [
"PolarionApiBaseException",
"PolarionApiException",
"PolarionApiInternalException",
"PolarionApiUnexpectedException",
"PolarionWorkItemException",
]


class PolarionApiBaseException(Exception):
"""Base exception, which is raised, if an API error occurs."""
Expand Down

0 comments on commit f814cfb

Please sign in to comment.