Skip to content

Commit

Permalink
Merge pull request #315 from bsummers-tc/main
Browse files Browse the repository at this point in the history
APP-3868 - updated all submodule
  • Loading branch information
bsummers-tc authored Jul 26, 2023
2 parents 0ee79ac + bacaa02 commit 59080c3
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 18 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,21 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.9']
python-version: ['3.11']

steps:
- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]
pip install .[dev,test]
pip freeze
- name: Lint with pre-commit
run: |
Expand Down
4 changes: 2 additions & 2 deletions tcex/api/tc/ti_transform/transform_abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def _process_associated_group(self, associations: list[AssociatedGroupTransform]
"""Process Attribute data"""
for association in associations or []:
for value in filter(bool, self._process_metadata_transform_model(association.value)):
self.add_associated_group(value)
self.add_associated_group(value) # type: ignore

def _process_metadata_transform_model(
self, value: bool | MetadataTransformModel | str | None, expected_length: int | None = None
Expand Down Expand Up @@ -410,7 +410,7 @@ def _process_tags(self, tags: list[TagTransformModel]):
"""Process Tag data"""
for tag in tags or []:
for value in filter(bool, self._process_metadata_transform_model(tag.value)):
self.add_tag(name=value)
self.add_tag(name=value) # type: ignore

def _process_rating(self, metadata: MetadataTransformModel | None):
"""Process standard metadata fields."""
Expand Down
2 changes: 1 addition & 1 deletion tcex/api/tc/v2/batch/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ def submit_all(
.get('data', {})
.get('batchStatus', {})
)
if errors:
if errors and batch_data is not None:
# retrieve errors
error_count = batch_data.get('errorCount', 0)
error_groups = batch_data.get('errorGroupCount', 0)
Expand Down
8 changes: 4 additions & 4 deletions tcex/api/tc/v3/_gen/_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,15 @@ def all( # pylint: disable=redefined-builtin
):
"""Generate Args."""
log_server()
gen_type = gen_type.value.lower()
gen_type_ = gen_type.value.lower()
for type_ in ObjectTypes:
type_ = util.snake_string(type_.value)

if gen_type in ['all', 'filter']:
if gen_type_ in ['all', 'filter']:
gen_filter(type_)
if gen_type in ['all', 'model']:
if gen_type_ in ['all', 'model']:
gen_model(type_)
if gen_type in ['all', 'object']:
if gen_type_ in ['all', 'object']:
gen_object(type_)


Expand Down
3 changes: 2 additions & 1 deletion tcex/api/tc/v3/_gen/_gen_abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,8 @@ def gen_requirements(self):
self.requirements['standard library'].append('from typing import TYPE_CHECKING')

indent = ''
_libs: list[dict | str] = []
# _libs: list[dict | str] = []
_libs = []
for from_, libs in self.requirements.items():
if not libs:
# continue if there are no libraries to import
Expand Down
2 changes: 1 addition & 1 deletion tcex/app/config
Submodule config updated 0 files
2 changes: 1 addition & 1 deletion tcex/app/key_value_store
Submodule key_value_store updated 0 files
2 changes: 1 addition & 1 deletion tcex/app/playbook
Submodule playbook updated 1 files
+2 −2 advanced_request.py
2 changes: 1 addition & 1 deletion tcex/pleb
Submodule pleb updated 0 files
2 changes: 1 addition & 1 deletion tcex/requests_tc
Submodule requests_tc updated 0 files
2 changes: 1 addition & 1 deletion tcex/util
2 changes: 1 addition & 1 deletion tests/api/tc/v3/indicators/test_indicator_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def test_indicator_address(self, request: FixtureRequest):
"""Test Artifact get single attached to task by id"""
associated_indicator = self.v3_helper.create_indicator()
associated_group = self.v3_helper.create_group(
**{
**{ # type: ignore
'associated_indicators': associated_indicator.model.gen_body(
method='PUT', nested=True
)
Expand Down

0 comments on commit 59080c3

Please sign in to comment.