title: "bool" is incompatible with "Column[bool]"PylancereportGeneralTypeIssues
body: <p>I am trying to update a simple record in Postgres table via FastAPI and SQL Alchmey.</p>
  <p>My endpoint is as follows:</p>
  <pre class="lang-py prettyprint-override"><code>@app.patch(
      &quot;/edit-audience/{audience_id}&quot;,
      response_model=schema.SignalJourneyAudiences,
      status_code=status.HTTP_200_OK,
  )
  def edit_audience(
      audience_id: int, sja: schema.SignalJourneyAudiences, db: Session = Depends(get_db)
  ):
      &quot;&quot;&quot;Edits an audience from SignalJourneyAudiences.&quot;&quot;&quot;
      audience = (
          db.query(models.SignalJourneyAudiences)
          .filter(models.SignalJourneyAudiences.audience_id == audience_id)
          .first()
      )
  
      audience.enabled = sja.enabled
  
      return audience
  </code></pre>
  <p>its schema is :</p>
  <pre class="lang-py prettyprint-override"><code>class SignalJourneyAudiences(BaseModel):
      &quot;&quot;&quot;SignalJourneyAudiences BaseModel.&quot;&quot;&quot;
  
      audience_id: Optional[int]  # PK
      segment: str
      enabled: bool
  
      class Config:
          &quot;&quot;&quot;config class&quot;&quot;&quot;
  
          orm_mode = True
  </code></pre>
  <p>and it's model is</p>
  <pre class="lang-py prettyprint-override"><code>class SignalJourneyAudiences(Base):
      &quot;&quot;&quot;Signal Journey Audiences&quot;&quot;&quot;
  
      __tablename__ = &quot;SignalJourneyAudiences&quot;
      audience_id = Column(Integer, primary_key=True, autoincrement=True)
      segment = Column(String)
      enabled = Column(Boolean)
  </code></pre>
  <p>I am getting this error in VSC using PyLance and it make zero sense too me?  As this is confusing as hell</p>
  <p><code>&quot;bool&quot; is incompatible with &quot;Column[bool]&quot;PylancereportGeneralTypeIssues</code></p>
  <pre class="lang-sh prettyprint-override"><code>(variable) enabled: bool
  Cannot assign member &quot;enabled&quot; for type &quot;SignalJourneyAudiences&quot;
    Expression of type &quot;bool&quot; cannot be assigned to member &quot;enabled&quot; of class &quot;SignalJourneyAudiences&quot;
      &quot;bool&quot; is incompatible with &quot;Column[bool]&quot;PylancereportGeneralTypeIssues
  &quot;enabled&quot; is not a known member of &quot;None&quot;PylancereportOptionalMemberAccess
  </code></pre>
  <p>This is how I will eventually call the endpoint and make the relevant update</p>
  <pre class="lang-js prettyprint-override"><code>// DELETES Audience from SignalJourneyAudiences
    function deleteAudience(audience_id) {
      console.log(segments);
      console.log('aid', audience_id);
  
      segments.map((segment) =&gt; {
        if (audience_id === segment.audience_id &amp;&amp; segment.enabled === false) {
          try {
            const deleteConstraint = fetch(
              `http://localhost:8000/edit-audience/${audience_id}`,
              {
                method: 'PATCH',
                headers: { 'Content-Type': 'application/json' },
                body: JSON.stringify({
                  enabled: true,
                }),
              }
            );
  
            if (deleteConstraint.status === 200) {
              window.location.reload();
            }
          } catch (error) {
            console.error(error);
          }
        }
  
        if (audience_id === segment.audience_id &amp;&amp; segment.enabled === true) {
          try {
            const deleteConstraint = fetch(
              `http://localhost:8000/edit-audience/${audience_id}`,
              {
                method: 'PATCH',
                headers: { 'Content-Type': 'application/json' },
                body: JSON.stringify({
                  enabled: false,
                }),
              }
            );
  
            if (deleteConstraint.status === 200) {
              window.location.reload();
            }
          } catch (error) {
            console.error(error);
          }
        }
      });
    }
  </code></pre>
  <p>Any Ideas on how to resolve this would be great, I am a bit of a loose end here.</p>