Skip to content
Snippets Groups Projects
Verified Commit 9d89b11b authored by Newbyte's avatar Newbyte :snowflake:
Browse files

pmb.helpers.args: Remove please_i_really_need_args()

All call sites that use this have been removed. This was only introduced
as a stopgap until we could refactor more code to not use args
everywhere, and that has now been achiveved. As such, remove this so it
doesn't get used in more locations.
parent 47dc4937
No related branches found
No related tags found
No related merge requests found
Pipeline #208595 failed
......@@ -3,12 +3,10 @@
import pmb.config
from pmb.core.context import Context
from pmb.core.pkgrepo import pkgrepo_default_path
from pmb.helpers import logging
from pmb.types import PmbArgs
import pmb.helpers.git
import pmb.helpers.args
__args: PmbArgs = PmbArgs()
"""This file constructs the args variable, which is passed to almost all
functions in the pmbootstrap code base. Here's a listing of the kind of
......@@ -49,7 +47,7 @@ __args: PmbArgs = PmbArgs()
def init(args: PmbArgs) -> PmbArgs:
global __args
args_ = PmbArgs()
# Basic initialization
# print(json.dumps(args.__dict__))
# sys.exit(0)
......@@ -120,14 +118,6 @@ def init(args: PmbArgs) -> PmbArgs:
# Copy all properties from args to out that don't start with underscores
for key, value in vars(args).items():
if not key.startswith("_") and not key == "from_argparse":
setattr(__args, key, value)
setattr(args_, key, value)
return __args
def please_i_really_need_args() -> PmbArgs:
import traceback
traceback.print_stack(file=logging.logfd)
logging.warning("FIXME: retrieved args where it shouldn't be needed!")
return __args
return args_
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment