Skip to content

Commit

Permalink
Ruff sorting imports too
Browse files Browse the repository at this point in the history
  • Loading branch information
chraibi committed Sep 30, 2024
1 parent caa5c33 commit 59fdbb1
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repos:
# Run the linter.
- id: ruff
types_or: [ python, pyi ] # Target Python files and type stub files
args: [ --fix ] # Automatically fix linting issues if possible
args: ['check', '--select', 'I', '--fix', '.']
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi ] # Format Python and stub files
Expand Down
1 change: 1 addition & 0 deletions src/classes/datafactory.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from dataclasses import dataclass, field
from pathlib import Path
from typing import List, Union

import pedpy
import requests # type: ignore
import streamlit as st
Expand Down
1 change: 1 addition & 0 deletions src/plotting/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import logging
from pathlib import Path
from typing import Any, Dict, Optional, Tuple, TypeAlias

import matplotlib
import matplotlib.pyplot as plt
import numpy as np
Expand Down
5 changes: 2 additions & 3 deletions src/tabs/LargeView_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@
from dataclasses import dataclass
from math import ceil, floor
from pathlib import Path
from typing import Dict, Tuple, Any
from typing import Any, Dict, Tuple

import matplotlib.pyplot as plt
import numpy as np

import pandas as pd
import plotly.figure_factory as ff
import plotly.graph_objects as go
import streamlit as st
from numba import njit
from numpy.typing import NDArray
from scipy.signal import butter, filtfilt
from tqdm import tqdm
from numpy.typing import NDArray

plt.rcParams["font.family"] = "STIXGeneral"

Expand Down
1 change: 0 additions & 1 deletion src/tabs/analysis_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

from ..classes.datafactory import load_file
from ..docs.docs import density_speed, flow

from ..helpers.utilities import (
download,
get_measurement_lines,
Expand Down
6 changes: 3 additions & 3 deletions src/tabs/contacts_tab.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
"""Map of the gps trajectories coupled with the contacts locations."""

from datetime import datetime
from io import BytesIO
from pathlib import Path
from typing import Tuple, List, Dict, Union, Optional
from typing import Dict, List, Optional, Tuple, Union

import folium
import gpxpy
Expand All @@ -14,10 +15,9 @@
import seaborn as sns
import streamlit as st
from matplotlib import colormaps
from matplotlib.figure import Figure as pltFigure
from plotly.graph_objects import Figure
from streamlit_folium import st_folium
from datetime import datetime
from matplotlib.figure import Figure as pltFigure


def load_and_process_contacts_data(csv_path: Path, pickle_path: Path) -> None:
Expand Down
3 changes: 1 addition & 2 deletions src/tabs/geometry_tab.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Streamlit app to create an animation of pedestrian movements."""

from pathlib import Path
from typing import Tuple

import numpy as np
import pandas as pd
Expand All @@ -12,8 +13,6 @@
from shapely.wkt import loads
from streamlit.delta_generator import DeltaGenerator

from typing import Tuple


def load_data(pickle_name: str) -> pd.DataFrame:
"""
Expand Down

0 comments on commit 59fdbb1

Please sign in to comment.