CCTV icon indicating copy to clipboard operation
CCTV copied to clipboard

Code refactoring

Open paracosm17 opened this issue 9 months ago • 2 comments

Just refactoring the code. The changes almost did not change the behavior of the program

The purpose of the fixes is to standardize the code to pep8, fix codestyle and identations, improve the performance and readability of the code

  1. Fix comments, empty strings, imports. Add ".idea" to .gitignore
  2. Fix "if" expressions. Fix lantitude, longitude types in "coordinates_overage" (from int to float). Remove timestamp from coordinates_overage (line 132 in original start.py), because redefined without timestamp in line 202, and so, timestamp in coordinates_overage is not used. Added better exception handling when opening a generated html file in the browser
  3. Code refactoring in functions.py. Added better get_location_details. The function "pring_city_by_geo" has been renamed to "print_city_by_geo". remove lon_rad from calculate_coordinates because not used. Change R to r. Correction of minor defects.

paracosm17 avatar May 11 '24 14:05 paracosm17

Hi @paracosm17 to keep code standard across future changes we need to have pipeline with a linter, could you please add it as a part of this PR? Ruff would be a preferred one.

ask0n avatar May 11 '24 16:05 ask0n

Hi @paracosm17 to keep code standard across future changes we need to have pipeline with a linter, could you please add it as a part of this PR? Ruff would be a preferred one.

Hello, I'll add It today

paracosm17 avatar May 11 '24 18:05 paracosm17