docstr: Reads the configuration file and set attributes.
docstr_tok: ["Reads","the","configuration","file","and","set","attributes","."]
code: def _set_config(self):
      """Reads the configuration file and set attributes."""
      config = self._read_pypirc()
      if config != {}:
          self.username = config["username"]
          self.password = config["password"]
          self.repository = config["repository"]
          self.realm = config["realm"]
          self.has_config = True
      else:
          if self.repository not in ("pypi", self.DEFAULT_REPOSITORY):
              raise ValueError(
                  "%s not found in .pypirc" % self.repository
              )
          if self.repository == "pypi":
              self.repository = self.DEFAULT_REPOSITORY
          self.has_config = False
  
file_path: catboost/contrib/python/setuptools/py3/setuptools/_distutils/command/register.py
imports: import getpass
  import io
  import logging
  import urllib.parse
  import urllib.request
  from warnings import warn
  from ..core import PyPIRCCommand
  from distutils._log import log
label_desc: Use image node_id 5 for calling the register obj's underlying member method code with example usage: obj._set_config() without return types