Skip to content

Commit

Permalink
Code formatting fixes with black
Browse files Browse the repository at this point in the history
  • Loading branch information
marcantoinedupre committed Jan 10, 2025
1 parent 9b7bf2a commit 19ad4ee
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 28 deletions.
5 changes: 1 addition & 4 deletions atlas/atlasRoutes.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,7 @@ def is_statut_in_groupe(statut, groupe):

groupes_statuts = []
for config_groupe in config.GROUPES_STATUTS:
groupe = {
"label": config_groupe.get("label", ""),
"statuts": []
}
groupe = {"label": config_groupe.get("label", ""), "statuts": []}
groupes_statuts.append(groupe)
for statut in statuts:
if is_statut_in_groupe(statut, config_groupe):
Expand Down
22 changes: 5 additions & 17 deletions atlas/configuration/config_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,25 +143,13 @@ class Meta:
GROUPES_STATUTS = fields.List(
fields.Dict,
load_default=[
{
"label": "Monde",
"origins": [
{"cd_type_statut": "LRM", "cd_sig": "WORLD"}
]
},
{
"label": "Europe",
"origins": [
{"cd_type_statut": "LRE", "cd_sig": "EUROPE"}
]
},
{"label": "Monde", "origins": [{"cd_type_statut": "LRM", "cd_sig": "WORLD"}]},
{"label": "Europe", "origins": [{"cd_type_statut": "LRE", "cd_sig": "EUROPE"}]},
{
"label": "France métropolitaine",
"origins": [
{"cd_type_statut": "LRN", "cd_sig": "TERFXFR"}
]
}
]
"origins": [{"cd_type_statut": "LRN", "cd_sig": "TERFXFR"}],
},
],
)

RANG_STAT = fields.List(
Expand Down
14 changes: 7 additions & 7 deletions atlas/modeles/repositories/vmStatutBdcRepository.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ def get_taxons_statut_bdc(connection, cd_ref):
statuts = list()
for row in result:
statut = {
'rq_statut': row.rq_statut,
'code_statut': row.code_statut,
'label_statut': row.label_statut,
'cd_type_statut': row.cd_type_statut,
'lb_type_statut': row.lb_type_statut,
'lb_adm_tr': row.lb_adm_tr,
'cd_sig': row.cd_sig,
"rq_statut": row.rq_statut,
"code_statut": row.code_statut,
"label_statut": row.label_statut,
"cd_type_statut": row.cd_type_statut,
"lb_type_statut": row.lb_type_statut,
"lb_adm_tr": row.lb_adm_tr,
"cd_sig": row.cd_sig,
}
statuts.append(statut)
return statuts

0 comments on commit 19ad4ee

Please sign in to comment.