Skip to content

Commit 1e7134e

Browse files
Fix pylint 'line-too-long' message and remove as disabled from global rules. #37
1 parent dcbf031 commit 1e7134e

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

.gitlab/linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Pylint:
2929
Pylint Hard:
3030
extends: .linter_template
3131
script:
32-
- pylint --rcfile=pylintrc $PWD --disable=missing-function-docstring,missing-class-docstring,line-too-long,invalid-name
32+
- pylint --rcfile=pylintrc $PWD --disable=missing-function-docstring,missing-class-docstring,invalid-name
3333

3434
#Quality Control:
3535
# allow_failure: false

src/main/session.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,22 @@ def request(self, method, url, **kwargs) -> Response:
3535
try:
3636
allure.attach(
3737
body=url.encode('utf8'),
38-
name=f'Request {response.status_code} {method} {url}',
38+
name=f'Request {response.status_code} {response.request.method} '
39+
f'{response.request.url}',
3940
attachment_type=allure.attachment_type.TEXT,
4041
extension='txt')
4142
response.json()
4243
allure.attach(
4344
body=json.dumps(response.json(), indent=4, ensure_ascii=False).encode('utf8'),
44-
name=f'Response {response.status_code} {response.request.method} {response.request.url}',
45+
name=f'Response {response.status_code} {response.request.method} '
46+
f'{response.request.url}',
4547
attachment_type=allure.attachment_type.JSON,
4648
extension='json')
4749
except ValueError as error:
4850
allure.attach(
4951
body=response.text.encode('utf8'),
50-
name=f'NOT JSON Response {response.status_code} {response.request.method} {response.request.url}',
52+
name=f'NOT JSON Response {response.status_code} {response.request.method} '
53+
f'{response.request.url}',
5154
attachment_type=allure.attachment_type.TEXT,
5255
extension='txt')
5356
raise error

src/test/old_ctc/tvprogram/test_weeks_slider.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ def test_current_week_has_words_in_days(browser_module):
1919
browser_module.open('https://ctc.ru/programm')
2020
logging.info('step1/2: finish')
2121
logging.info('step2/2: start')
22-
browser_module.all('.current_week .slider-item-day .m-desktop .day-week').should(have.exact_texts(*weekdays.in_words()))
22+
browser_module.all('.current_week .slider-item-day .m-desktop .day-week')\
23+
.should(have.exact_texts(*weekdays.in_words()))
2324
logging.info('step2/2: finish')
2425

2526

@@ -28,5 +29,6 @@ def test_today_is_active(browser_module):
2829
browser_module.open('https://ctc.ru/programm')
2930
logging.info('step1/2: finish')
3031
logging.info('step2/2: start')
31-
browser_module.element('.current_week .slider-item-day.current').should(have.exact_text('СЕГОДНЯ'))
32+
browser_module.element('.current_week .slider-item-day.current')\
33+
.should(have.exact_text('СЕГОДНЯ'))
3234
logging.info('step2/2: finish')

src/test/test_file_downloader.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ def test_download_course():
2626
logging.info(f'start download {content_url}')
2727

2828
with open(course + '/' + content_url.split('.net/')[1].replace('/', '.'), 'wb') as file:
29-
for chunk in requests.get(url=content_url, stream=True).iter_content(chunk_size=1024 * 1024):
29+
for chunk in requests.get(url=content_url,
30+
stream=True).iter_content(chunk_size=1024 * 1024):
3031
if chunk:
3132
file.write(chunk)
3233

0 commit comments

Comments
 (0)