Skip to content

Commit

Permalink
quality: fix sonar
Browse files Browse the repository at this point in the history
  • Loading branch information
Guts committed Feb 14, 2024
1 parent b108f2d commit db00166
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 53 deletions.
5 changes: 0 additions & 5 deletions geotribu_cli/comments/comments_broadcast.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,3 @@ def run(args: argparse.Namespace):
# open a result
if args.opt_auto_open_disabled:
open_uri(in_filepath=online_post.get("url"))


# -- Stand alone execution
if __name__ == "__main__":
pass
5 changes: 0 additions & 5 deletions geotribu_cli/comments/comments_latest.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,3 @@ def run(args: argparse.Namespace):
else:
print(":person_shrugging: Aucun commentaire trouvé")
sys.exit(0)


# -- Stand alone execution
if __name__ == "__main__":
pass
5 changes: 0 additions & 5 deletions geotribu_cli/comments/comments_open.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,3 @@ def run(args: argparse.Namespace):
)
else:
open_uri(in_filepath=comment_obj.url_to_comment)


# -- Stand alone execution
if __name__ == "__main__":
pass
5 changes: 0 additions & 5 deletions geotribu_cli/content/new_article.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,3 @@ def run(args: argparse.Namespace):
# open a result
if args.opt_auto_open_disabled:
open_uri(in_filepath=out_filepath)


# -- Stand alone execution
if __name__ == "__main__":
pass
5 changes: 0 additions & 5 deletions geotribu_cli/images/images_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,3 @@ def run(args: argparse.Namespace):
"images/optim"
)
)


# -- Stand alone execution
if __name__ == "__main__":
pass
5 changes: 0 additions & 5 deletions geotribu_cli/rss/rss_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,3 @@ def run(args: argparse.Namespace):
content_uri=feed_items[int(result_to_open)].url,
application=getenv("GEOTRIBU_OPEN_WITH", "shell"),
)


# -- Stand alone execution
if __name__ == "__main__":
pass
11 changes: 3 additions & 8 deletions geotribu_cli/search/search_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,9 @@ def run(args: argparse.Namespace):

# crée un résultat de sortie
out_result = {
"type": "Article"
if result.get("ref").startswith("articles/")
else "GeoRDP",
"type": (
"Article" if result.get("ref").startswith("articles/") else "GeoRDP"
),
"date": rezult_date,
"score": f"{result.get('score'):.3}",
"url": f"{defaults_settings.site_base_url}{result.get('ref')}",
Expand Down Expand Up @@ -460,8 +460,3 @@ def run(args: argparse.Namespace):
content_uri=final_results[int(result_to_open)].get("url"),
application=getenv("GEOTRIBU_OPEN_WITH", "shell"),
)


# -- Stand alone execution
if __name__ == "__main__":
pass
5 changes: 0 additions & 5 deletions geotribu_cli/search/search_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,3 @@ def run(args: argparse.Namespace):
content_uri=final_results[int(result_to_open)].get("url"),
application=getenv("GEOTRIBU_OPEN_WITH", "shell"),
)


# -- Stand alone execution
if __name__ == "__main__":
pass
5 changes: 0 additions & 5 deletions geotribu_cli/social/cmd_mastodon_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,3 @@ def run(args: argparse.Namespace):
"mastodon_comptes_des_listes_geotribu.csv"
),
)


# -- Stand alone execution
if __name__ == "__main__":
pass
5 changes: 0 additions & 5 deletions geotribu_cli/subcommands/open_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,3 @@ def run(args: argparse.Namespace):
print(f"Ouverture du résultat précédent n°{args.result_index} : {result_uri}")

open_content(content_uri=result_uri, application=args.open_with)


# -- Stand alone execution
if __name__ == "__main__":
pass

0 comments on commit db00166

Please sign in to comment.