Skip to content

Commit 0497844

Browse files
authored
fix: consolidate profiles_id and profile_id (#53)
Signed-off-by: Timothy-Yao <[email protected]> Co-authored-by: Timothy-Yao <[email protected]>
1 parent aa3591a commit 0497844

14 files changed

+203
-291
lines changed

.pylintrc

Lines changed: 2 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -43,97 +43,7 @@ confidence=HIGH
4343
# --enable=similarities". If you want to run only the classes checker, but have
4444
# no Warning level messages displayed, use "--disable=all --enable=classes
4545
# --disable=W".
46-
disable=too-many-arguments,
47-
too-many-public-methods,
48-
too-few-public-methods,
49-
too-many-instance-attributes,
50-
too-many-locals,
51-
too-many-branches,
52-
too-many-lines,
53-
line-too-long,
54-
bad-continuation,
55-
similarities,
56-
print-statement,
57-
parameter-unpacking,
58-
unpacking-in-except,
59-
old-raise-syntax,
60-
backtick,
61-
long-suffix,
62-
old-ne-operator,
63-
old-octal-literal,
64-
import-error,
65-
import-star-module-level,
66-
non-ascii-bytes-literal,
67-
raw-checker-failed,
68-
bad-inline-option,
69-
locally-disabled,
70-
file-ignored,
71-
suppressed-message,
72-
useless-suppression,
73-
deprecated-pragma,
74-
use-symbolic-message-instead,
75-
apply-builtin,
76-
basestring-builtin,
77-
buffer-builtin,
78-
cmp-builtin,
79-
coerce-builtin,
80-
execfile-builtin,
81-
file-builtin,
82-
long-builtin,
83-
raw_input-builtin,
84-
reduce-builtin,
85-
standarderror-builtin,
86-
unicode-builtin,
87-
xrange-builtin,
88-
coerce-method,
89-
delslice-method,
90-
getslice-method,
91-
setslice-method,
92-
no-absolute-import,
93-
old-division,
94-
dict-iter-method,
95-
dict-view-method,
96-
next-method-called,
97-
metaclass-assignment,
98-
indexing-exception,
99-
raising-string,
100-
reload-builtin,
101-
oct-method,
102-
hex-method,
103-
nonzero-method,
104-
cmp-method,
105-
input-builtin,
106-
round-builtin,
107-
intern-builtin,
108-
unichr-builtin,
109-
map-builtin-not-iterating,
110-
zip-builtin-not-iterating,
111-
range-builtin-not-iterating,
112-
filter-builtin-not-iterating,
113-
using-cmp-argument,
114-
eq-without-hash,
115-
div-method,
116-
idiv-method,
117-
rdiv-method,
118-
exception-message-attribute,
119-
invalid-str-codec,
120-
sys-max-int,
121-
bad-python3-import,
122-
deprecated-string-function,
123-
deprecated-str-translate-call,
124-
deprecated-itertools-function,
125-
deprecated-types-field,
126-
next-method-defined,
127-
dict-items-not-iterating,
128-
dict-keys-not-iterating,
129-
dict-values-not-iterating,
130-
deprecated-operator-function,
131-
deprecated-urllib-function,
132-
xreadlines-attribute,
133-
deprecated-sys-function,
134-
exception-escape,
135-
comprehension-escape,
136-
invalid-name
46+
disable=C0103,W0603
13747

13848
# Enable the message, report, category or checker with the given id(s). You can
13949
# either give multiple identifier separated by comma (,) or put this option
@@ -572,5 +482,4 @@ valid-metaclass-classmethod-first-arg=cls
572482

573483
# Exceptions that will emit a warning when being caught. Defaults to
574484
# "BaseException, Exception".
575-
overgeneral-exceptions=BaseException,
576-
Exception
485+
overgeneral-exceptions=builtins.BaseException

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ install_project:
1919
test: test-unit test-int
2020

2121
test-unit:
22-
python -m pytest test/unit
22+
python -m pytest tests/unit
2323

2424
test-int:
25-
python -m pytest test/integration
25+
python -m pytest tests/integration
2626

2727
lint:
2828
./pylint.sh

build/testScript.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22
set -euo pipefail
33
echo "${SCC_ENV}" | base64 -d >> security_and_compliance_center_api_v3.env
4-
python -m pytest test/integration
4+
python -m pytest tests/integration

examples/test_security_and_compliance_center_api_v3_examples.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ def test_get_profile_example(self):
563563
# begin-get_profile
564564

565565
response = security_and_compliance_center_api_service.get_profile(
566-
profiles_id=profile_id_link,
566+
profile_id=profile_id_link,
567567
)
568568
profile = response.get_result()
569569

@@ -598,7 +598,7 @@ def test_replace_profile_example(self):
598598
}
599599

600600
response = security_and_compliance_center_api_service.replace_profile(
601-
profiles_id=profile_id_link,
601+
profile_id=profile_id_link,
602602
profile_name='test_profile1',
603603
profile_description='test_description1',
604604
profile_type='custom',
@@ -752,7 +752,7 @@ def test_create_attachment_example(self):
752752
}
753753

754754
response = security_and_compliance_center_api_service.create_attachment(
755-
profiles_id=profile_id_link,
755+
profile_id=profile_id_link,
756756
attachments=[attachments_prototype_model],
757757
)
758758
attachment_prototype = response.get_result()
@@ -777,7 +777,7 @@ def test_list_attachments_example(self):
777777
all_results = []
778778
pager = AttachmentsPager(
779779
client=security_and_compliance_center_api_service,
780-
profiles_id=profile_id_link,
780+
profile_id=profile_id_link,
781781
x_correlation_id='testString',
782782
x_request_id='testString',
783783
limit=10,
@@ -804,7 +804,7 @@ def test_get_profile_attachment_example(self):
804804

805805
response = security_and_compliance_center_api_service.get_profile_attachment(
806806
attachment_id=attachment_id_link,
807-
profiles_id=profile_id_link,
807+
profile_id=profile_id_link,
808808
)
809809
attachment_item = response.get_result()
810810

@@ -857,7 +857,7 @@ def test_replace_profile_attachment_example(self):
857857

858858
response = security_and_compliance_center_api_service.replace_profile_attachment(
859859
attachment_id=attachment_id_link,
860-
profiles_id=profile_id_link,
860+
profile_id=profile_id_link,
861861
scope=[multi_cloud_scope_model],
862862
status='enabled',
863863
schedule='every_30_days',
@@ -1340,7 +1340,7 @@ def test_delete_profile_attachment_example(self):
13401340

13411341
response = security_and_compliance_center_api_service.delete_profile_attachment(
13421342
attachment_id=attachment_id_link,
1343-
profiles_id=profile_id_link,
1343+
profile_id=profile_id_link,
13441344
)
13451345
attachment_item = response.get_result()
13461346

@@ -1361,7 +1361,7 @@ def test_delete_custom_profile_example(self):
13611361
# begin-delete_custom_profile
13621362

13631363
response = security_and_compliance_center_api_service.delete_custom_profile(
1364-
profiles_id=profile_id_link,
1364+
profile_id=profile_id_link,
13651365
)
13661366
profile = response.get_result()
13671367

0 commit comments

Comments
 (0)