Repository: Chia-Network/chia-blockchain
File: chia/cmds/configure.py (Python)

Code before:
    set_farmer_peer: str,
    set_node_introducer: str,
    set_fullnode_port: str,
    set_harvester_port: str,
    set_log_level: str,
    enable_upnp: str,
    set_outbound_peer_count: str,
    set_peer_count: str,
    testnet: str,
    peer_connect_timeout: str,
    crawler_db_path: str,
    crawler_minimum_version_count: Optional[int],
    seeder_domain_name: str,
    seeder_nameserver: str,
) -> None:
    config_yaml = "config.yaml"
    with lock_and_load_config(root_path, config_yaml, fill_missing_services=True) as config:
        config.update(load_defaults_for_missing_services(config=config, config_name=config_yaml))

        change_made = False
        if set_node_introducer:
            try:
                host, port = parse_host_port(set_node_introducer)
                config["full_node"]["introducer_peer"]["host"] = host
                config["full_node"]["introducer_peer"]["port"] = int(port)
                config["introducer"]["port"] = int(port)
                print("Node introducer updated")
                change_made = True
            except ValueError:
                print("Node introducer address must be in format [IP:Port]")
        if set_farmer_peer:
            try:
                host, port = parse_host_port(set_farmer_peer)
                set_peer_info(config["harvester"], peer_type=NodeType.FARMER, peer_host=host, peer_port=int(port))
                print("Farmer peer updated, make sure your harvester has the proper cert installed")
                change_made = True
            except ValueError:
                print("Farmer address must be in format [IP:Port]")
        if set_fullnode_port:
            config["full_node"]["port"] = int(set_fullnode_port)
            config["full_node"]["introducer_peer"]["port"] = int(set_fullnode_port)
            set_peer_info(config["farmer"], peer_type=NodeType.FULL_NODE, peer_port=int(set_fullnode_port))
            set_peer_info(config["timelord"], peer_type=NodeType.FULL_NODE, peer_port=int(set_fullnode_port))
            set_peer_info(config["wallet"], peer_type=NodeType.FULL_NODE, peer_port=int(set_fullnode_port))
            config["wallet"]["introducer_peer"]["port"] = int(set_fullnode_port)
            config["introducer"]["port"] = int(set_fullnode_port)
            print("Default full node port updated")
            change_made = True
        if set_harvester_port:
            config["harvester"]["port"] = int(set_harvester_port)
            print("Default harvester port updated")

Review comment (suggestion):
```suggestion
                config["full_node"]["introducer_peer"]["port"] = port
                config["introducer"]["port"] = port
```
I'm guessing `port` is already an `int` here, right? There are more places like this

Code after:
    set_farmer_peer: str,
    set_node_introducer: str,
    set_fullnode_port: str,
    set_harvester_port: str,
    set_log_level: str,
    enable_upnp: str,
    set_outbound_peer_count: str,
    set_peer_count: str,
    testnet: str,
    peer_connect_timeout: str,
    crawler_db_path: str,
    crawler_minimum_version_count: Optional[int],
    seeder_domain_name: str,
    seeder_nameserver: str,
) -> None:
    config_yaml = "config.yaml"
    with lock_and_load_config(root_path, config_yaml, fill_missing_services=True) as config:
        config.update(load_defaults_for_missing_services(config=config, config_name=config_yaml))

        change_made = False
        if set_node_introducer:
            try:
                host, port = parse_host_port(set_node_introducer)
                config["full_node"]["introducer_peer"]["host"] = host
                config["full_node"]["introducer_peer"]["port"] = port
                config["introducer"]["port"] = port
                print("Node introducer updated")
                change_made = True
            except ValueError:
                print("Node introducer address must be in format [IP:Port]")
        if set_farmer_peer:
            try:
                host, port = parse_host_port(set_farmer_peer)
                set_peer_info(config["harvester"], peer_type=NodeType.FARMER, peer_host=host, peer_port=port)
                print("Farmer peer updated, make sure your harvester has the proper cert installed")
                change_made = True
            except ValueError:
                print("Farmer address must be in format [IP:Port]")
        if set_fullnode_port:
            config["full_node"]["port"] = int(set_fullnode_port)
            config["full_node"]["introducer_peer"]["port"] = int(set_fullnode_port)
            set_peer_info(config["farmer"], peer_type=NodeType.FULL_NODE, peer_port=int(set_fullnode_port))
            set_peer_info(config["timelord"], peer_type=NodeType.FULL_NODE, peer_port=int(set_fullnode_port))
            set_peer_info(config["wallet"], peer_type=NodeType.FULL_NODE, peer_port=int(set_fullnode_port))
            config["wallet"]["introducer_peer"]["port"] = int(set_fullnode_port)
            config["introducer"]["port"] = int(set_fullnode_port)
            print("Default full node port updated")
            change_made = True
        if set_harvester_port:
            config["harvester"]["port"] = int(set_harvester_port)
            print("Default harvester port updated")